﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using KeRui.Common;

public partial class Manage_Top : System.Web.UI.Page
{
    public int SiteID = PageRequest.GetInt("siteid", -1);
    
    public string TopMenu = "";

    protected void Page_Load(object sender, EventArgs e)
    {
        ManageHelper.CheckAdminLogin("top");

        if (SiteID > 0) 
        {
            TopMenu += "<a href='menu.aspx?siteid=" + SiteID + "&act=ContentManage&actname=信息管理' target='left'>信息管理</a>";
            TopMenu += "|<a href='menu.aspx?siteid=" + SiteID + "&act=FunctionManage&actname=功能管理' target='left'>功能管理</a>";
            TopMenu += "|<a href='menu.aspx?siteid=" + SiteID + "&act=TemplateManage&actname=显示管理' target='left'>显示管理</a>";
            TopMenu += "|<a href='menu.aspx?siteid=" + SiteID + "&act=ConfigManage&actname=配置管理' target='left'>配置管理</a>";
            TopMenu += "|<a href='menu.aspx?siteid=" + SiteID + "&act=HtmlManage&actname=生成管理' target='left'>生成管理</a>";
            TopMenu += "|<a href='menu.aspx?act=UserRole&actname=成员权限' target='left'>成员权限</a>";
        }
        else
        {
            if (ManageHelper.CheckAdminHavePower1("siteconfiguration"))
                TopMenu += "<a href='menu.aspx?act=&actname=站点管理' target='left'>站点管理</a>";
            if (ManageHelper.CheckAdminHavePower1("UserRole"))
                TopMenu += "" + getsplit(TopMenu) + "<a href='menu.aspx?act=UserRole&actname=成员权限' target='left'>成员权限</a>";
            if (ManageHelper.CheckAdminHavePower1("SiteConfiguration"))
                TopMenu += "" + getsplit(TopMenu) + "<a href='menu.aspx?act=SiteConfiguration&actname=站点配置' target='left'>站点配置</a>";
                if (ManageHelper.CheckAdminHavePower1("SystemTool"))
                TopMenu += "" + getsplit(TopMenu) + "<a href='menu.aspx?act=SystemTool&actname=系统工具' target='left'>系统工具</a>";
          }
        TopMenu += "" + getsplit(TopMenu) + "<A href='" + KeRui.Kernel.Software.HelpUrl + "' target='_blank'>系统帮助</a>";
    }
    private string getsplit(string xs)
    {
        if (xs != "")
        {
            xs = "|";
        }
        return xs;
    }
}
